<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="utf-8"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>车辆基础资料</title>
<link href="<%=path%>/CSS/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=path%>/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="<%=path%>/JQuery/jquery-1.8.2.js"></script>
    <%@ include file="/WEB-INF/JSP/ajax.jsp" %>
</head>
<style type="text/css">
.seachform li label{line-height: 45px;color: #444444	}
.scinput{line-height: 10px;margin-top: 5px}
.scinput1{margin-top: 5px;height: 30px;}
.scbtn{background: #57a0ff;border-radius:20px;width: 110px;margin-top: 4px;height: 35px}
.scbtn2{height: 20px;background: #57a0ff;border-radius:20px;width: 50px;color: #fff;display: none;}
border: none;margin: 10px 0px}
.tablelist th{background: none;border-bottom: none;}
thead {background: #f2f2f2}
tbody tr:nth-child(even) {background: #f7f8fd}
.tablelist th{height: 45px;padding-left: 30px}
.tablelist td{border-right:none;padding-left: 30px}
tbody tr{height: 38px}
.check{display: none;padding-left: 0px}
a{cursor: pointer;}
.type {width: 130px;height: 30px;margin-top: 7px}
</style>
<body  style="background: #f5f5f5;padding: 0 40px;">
		<div class="place" style="background: #f5f5f5;margin-top: 10px">
			<ul class="placeul">
				<li><a href="#">基础资料</a></li>
				<li><a href="#">日志</a></li>
				<li><a href="<%=path%>/DrivingSys/queryLog/look.action">日志</a></li>
			</ul>
		</div>
	
		<div class="rightinfo" style="background: #fff;border-radius:10px;height: 45px;">

			<form action="<%=path%>/DrivingSys/queryLogByCondition" method="post">
				<ul class="seachform">
					   <li><label>功能名称</label><input name="fnameL2" type="text" class="scinput" value="${fnameL2}"/></li>
					    <li><label>功能描述</label><input name="fdescriptionL2" type="text" class="scinput" value="${fdescriptionL2}"/></li>
                    <li><label>学员</label><input name="student" type="text" class="scinput" value="${student}"/></li>
					    <li><label>开始时间</label><input class="scinput1"  name="beginTime" type="text" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}',dateFmt:'yyyy-MM-dd HH:mm:ss'})" 
					    id="datemin" class="input-text Wdate" style="width:130px;" value="${beginTime}"></li>
                    <li><label>结束时间</label><input class="scinput1" name="endTime" type="text"
                                                  onfocus="WdatePicker({minDate:'#F{$dp.$D(\'datemin\')}',dateFmt:'yyyy-MM-dd HH:mm:ss'})"
                                                  id="datemax" class="input-text Wdate" style="width:130px;" value="${endTime}"></li>
                    <li><label>&nbsp;</label><input name="" type="submit" class="scbtn" value="立即查询"/></li>
                    <shiro:hasPermission name="/importCustomLog">
                        <li><label>&nbsp;</label><input name="" type="button" id="importTrainCharge" class="scbtn"
                                                        value="导出Excel"/></li>
                    </shiro:hasPermission>
				</ul>
			</form>
		</div>


        <div style="width: 100%;margin-bottom: 10px;margin-top: 30px;background: #fff;border-radius:10px;box-shadow: 0 0 10px #f2f2f2;min-height: 600px">
            <table class="tablelist" style="width: auto">
			<thead>
				<tr>
                    <th width="80px">标识</th>
                    <th width="200px">功能名称</th>
                    <th width="800px">功能描述</th>
                    <th width="400px">创建时间</th>
                    <th width="300px">创建人</th>
                    <th width="300px">学员</th>
				</tr>
			</thead>
			<c:forEach items="${customLogs}" var="customLogs" varStatus="s">
				<tr>
					<td>${s.index+1}</td>
					<td>${customLogs.fnameL2}</td>
					<td>${customLogs.fdescriptionL2}</td>
					<td>${customLogs.fcreatetime}</td>
					<td>${customLogs.createName}</td>
					<td>${customLogs.studentName}</td>
				</tr>
			</c:forEach>
		</table>
		</div>
        <pg:pager items="${pb.tr}" url="${pb.url}" export="offset,currentPageNumber=pageNumber" maxPageItems="${pb.ps}">
            <pg:param name="fnameL2" value="${fnameL2}"/>
            <pg:param name="fdescriptionL2" value="${fdescriptionL2}"/>
            <pg:param name="beginTime" value="${beginTime}"/>
            <pg:param name="endTime" value="${endTime}"/>
            <pg:param name="student" value="${student}"/>
            <pg:index>
               <pg:first><a href="${pageUrl}&&type=${type}"><nobr>[首页]</nobr></a></pg:first>  
               <pg:prev><a href="${pageUrl}&&type=${type}">前一页</a></pg:prev>  
               <pg:pages>  
                     <c:choose>  
                        <c:when test="${currentPageNumber eq pageNumber}">    
                           <font color="red">${pageNumber }</font>  
                        </c:when>    
                        <c:otherwise>    
                           <a href="${pageUrl}&&type=${type}">${pageNumber}</a>   
                        </c:otherwise>    
                     </c:choose>  
               </pg:pages>  
               <pg:next><a href="${pageUrl}&&type=${type}">下一页</a></pg:next>  
               <pg:last><a href="${pageUrl}&&type=${type}"><nobr>[尾页]</nobr></a></pg:last>  
            </pg:index>
        </pg:pager>
        <div style="height: 30px"></div>
</body>

<script type="text/javascript">
    $("#importTrainCharge").click(function () {
        var fnameL2 = $("input[name='fnameL2']").val();//功能名称
        var fdescriptionL2 = $("input[name='fdescriptionL2']").val();//功能描述
        var student = $("input[name='student']").val();//学员
        var beginTime = $("input[name='beginTime']").val();//开始时间
        var endTime = $("input[name='endTime']").val();//结束时间
        location = '<%=path%>/DrivingSys/importCustomLog?fnameL2=' + fnameL2 + '&fdescriptionL2=' + fdescriptionL2 + '&beginTime=' + beginTime + '&endTime=' + endTime + '&student=' + student
    })
</script>
</html>